#include "config.h"

Config::Config()
{
    portFileName = "port.conf";
}

QPair<QString, QString> Config::getPortConfig(){
    QPair<QString, QString> portSetting;

    QFile dataFile(portFileName.toUtf8().constData());
        if (dataFile.open(QIODevice::ReadOnly))
        {
           QTextStream in(&dataFile);
           portSetting.first = in.readLine();
           portSetting.second = in.readLine();

           dataFile.close();
        }

    return portSetting;
}

bool Config::existPortConfig(){
    return QFile::exists(portFileName);
}
